package org.hard.model.structure.decorator;

/**
 * @author: 王林博
 * @date: 2023年07月13日 17:27
 */
public class ApplicationConfigurator {

    public static void main(String[] args) {
        DataSource source = new FileDataSource("salary.dat");
//        if (enabledEncryption)
        source = new CompressionDecorator(source);

        source = new EncryptionDecorator(source);
        source.writeData("test");

    }

    void configurationExample(){

//        if (enabledCompression)
//        source = new CompressionDecorator(source);
//
//        SalaryManager logger = new SalaryManager(source);
//        String salary = logger.load();

    }
}
